 package com.example.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.entity.Message;

public interface MessageService extends IService<Message> {
    
    // 发送消息
    boolean sendMessage(Message message);
    
    // 批量发送消息
    boolean batchSendMessage(Message message, Long[] receiverIds);
    
    // 标记消息为已读
    boolean markAsRead(Long id);
    
    // 批量标记消息为已读
    boolean batchMarkAsRead(Long[] ids);
    
    // 删除消息
    boolean deleteMessage(Long id);
    
    // 批量删除消息
    boolean batchDeleteMessages(Long[] ids);
    
    // 分页查询消息列表
    Page<Message> getMessageList(Integer pageNum, Integer pageSize, Long receiverId, Integer type, Integer status);
    
    // 获取未读消息数量
    Integer getUnreadCount(Long receiverId);
}